#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>

using namespace std;

int Fac(int n)
{
    if (n == 1)  return 1;
    return n * Fac(n - 1);
}
int main()
{
    int n;
    cin >> n;
    cout << Fac(n) << endl;
    return 0;
}